package com.football.springboot.entity;


import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.football.springboot.config.BigDecimalFormatSerializer;
import com.football.springboot.config.CustomerDoubleSerialize;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.models.auth.In;
import lombok.Data;
import org.apache.poi.hpsf.Decimal;

import java.math.BigDecimal;


@ApiModel(value = "比赛数据表", description = "")
@TableName("game_data")
@Data
public class GameData {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty("主队进球")
    private Double homeGoal;

    @ApiModelProperty("客队进球")
    private Double awayGoal;

    @ApiModelProperty("主队控球")
    @JsonSerialize(using = CustomerDoubleSerialize.class)
    private Double homeControl;

    @ApiModelProperty("客队控球")
    @JsonSerialize(using = CustomerDoubleSerialize.class)
    private Double awayControl;

    @ApiModelProperty("主队射门")
    private Double homeShoot;
    @ApiModelProperty("主队射正")
    private Double homeOntarget;

    @ApiModelProperty("主队传球")
    private Double homePass;
    @ApiModelProperty("主队成功传球")
    private Double homeOkpass;
    @ApiModelProperty("主队过人")
    private Double homeSurpass;
    @ApiModelProperty("主队越位")
    private Double homeOffside;


    @ApiModelProperty("客队射门")
    private Double awayShoot;
    @ApiModelProperty("客队射正")
    private Double awayOntarget;

    @ApiModelProperty("客队传球")
    private Double awayPass;
    @ApiModelProperty("客队成功传球")
    private Double awayOkpass;
    @ApiModelProperty("客队过人")
    private Double awaySurpass;
    @ApiModelProperty("客队越位")
    private Double awayOffside;

    @ApiModelProperty("主队犯规")
    private Double homeFoul;
    @ApiModelProperty("主队黄牌")
    private Double homeYcard;
    @ApiModelProperty("主队红牌")
    private Double homeRcard;

    @ApiModelProperty("客队犯规")
    private Double awayFoul;
    @ApiModelProperty("客队黄牌")
    private Double awayYcard;
    @ApiModelProperty("客队红牌")
    private Double awayRcard;

    @TableField
    private Integer gameId;

    @TableField(exist = false)
    private Team homeTeamInfo; // 主场球队信息

    @TableField(exist = false)
    private Team awayTeamInfo; // 客场球队信息
}
